<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<img  id="d" src="../img/banner_1.jpg">
<script>
    var  number1=1;

 function fun(){
      number1++;
      // if(number1>3){
      //      number1=1;
      // }
     var d = document.getElementById("d");
     d.src="../img/banner_"+number1+".jpg";
 }if(number1=3){
        setTimeout(fun,1000);
    }
    if(number1=2){
        setTimeout(fun,1000);
    }
    if(number1=1){
        setTimeout(fun,1000);
    }




 // setInterval(fun,2000);
</script>

</body>
</html>